package com.weiz.designpatterns.observer;

public class ObserverTest {
    public static void main(String[] args) {
        //1.创建公众号对象
        SubscriptionSubject subject = new SubscriptionSubject();

        //2.订阅公众号
        subject.attach(new WeiXinObserver("Tom"));
        subject.attach(new WeiXinObserver("Mike"));
        subject.attach(new WeiXinObserver("Jerry"));

        //3.公众号更新
        subject.notify("公众号专栏更新了！");
    }
}
